// import axios from "axios";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import Vue from "vue";
import VueResource from "vue-resource";
import VueRouter from "vue-router";
import Layout from "./components/layout";
import DetailPage from "./pages/detail";
import DetailAnaPage from "./pages/detail/analysis";
import DetailCouPage from "./pages/detail/count";
import DetailForPage from "./pages/detail/forecast";
import DetailPptPage from "./pages/detail/plish";
import DetailPubPage from "./pages/detail/publish";
import IndexPage from "./pages/index";
import OrderListPage from "./pages/orderList";
// Vue.prototype.$axios = axios;
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(VueResource);
let router = new VueRouter({
  mode: "history",
  routes: [
    {
      path: "/",
      component: IndexPage,
    },
    {
      path: "/orderList",
      component: OrderListPage,
    },
    {
      path: "/detail",
      component: DetailPage,
      redirect: "/detail/analysis",
      children: [
        {
          path: "analysis",
          component: DetailAnaPage,
        },
        {
          path: "count",
          component: DetailCouPage,
        },
        {
          path: "forecast",
          component: DetailForPage,
        },
        {
          path: "publish",
          component: DetailPubPage,
        },
        {
          path: "plish",
          component: DetailPptPage,
        },
      ],
    },
  ],
});
/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  template: "<Layout/>",
  components: { Layout },
});
